]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ScreenShield: hide Removable devices in the lock screen
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 16 Aug 2012 20:30:32 +0000 (22:30 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 26 Aug 2012 12:30:45 +0000 (14:30 +0200)
Showing the removable devices is potentially a security risk (as
they include network shares). Also, a nautilus launched from there
can't be used, so it's just a way to overload the system.

https://bugzilla.gnome.org/show_bug.cgi?id=681143

js/ui/autorunManager.js
js/ui/messageTray.js
js/ui/screenShield.js

index f39ada3eb274dea177fedc6c9190892ec4dfb7a0..e93fbfc9ae089b52888911e3da5817f88e96926b 100644 (file)
@@ -262,6 +262,7 @@ const AutorunResidentSource = new Lang.Class({
 
     _init: function() {
         this.parent(_("Removable Devices"), 'media-removable', St.IconType.FULLCOLOR);
+        this.showInLockScreen = false;
 
         this._mounts = [];
 
index a231c9d9262564b4da5c2be7971bef6957e04fcb..a2729d3eec1e731edef0492b07f1545228fd2308 100644 (file)
@@ -1037,6 +1037,7 @@ const Source = new Lang.Class({
         this.isTransient = false;
         this.isChat = false;
         this.isMuted = false;
+        this.showInLockScreen = true;
 
         this.notifications = [];
     },
index 74996da877c6be710a7daa2113cf5518e050dced..9d7237c8ff8ccd2423da89f49679e297185ba156 100644 (file)
@@ -159,8 +159,9 @@ const NotificationsBox = new Lang.Class({
     },
 
     _summaryItemAdded: function(tray, item, dontUpdateVisibility) {
-        // Ignore transient sources
-        if (item.source.isTransient)
+        // Ignore transient sources, or sources explicitly marked not to show
+        // in the lock screen
+        if (item.source.isTransient || !item.source.showInLockScreen)
             return;
 
         let obj = {